package com.lxw.report.engine.dataModel.report;


import com.lxw.report.engine.dataModel.column.ColumnLinkReportParam;
import com.lxw.report.engine.dataModel.column.ColumnSortType;
import com.lxw.report.engine.enums.BIColumnTypeEnum;
import com.lxw.report.engine.enums.DbColumnTypeEnum;

import java.util.List;

/**
 * 报表中对应每个数据集列的额外设置
 */
public class ReportColumn {
    /**
     * 列的sql列名,
     */
    private String sqlColumnName;
    /**
     * 列的报表显示的列名,
     */
    private String reportColumnName;
    /**
     * 该列在数据库中的数据类型,
     */
    private DbColumnTypeEnum dbColumnType;
    /**
     * 该列在bi中的类型(精确),
     */
    private BIColumnTypeEnum biColumnType;
    /**
     * 排序类型(只对维度列有效)
     */
    private ColumnSortType sortType = ColumnSortType.DEFAULT;
    /**
     * 单元格 格式化配置
     */
    private ReportCellSetting setting;
    /**
     * 是否根据左侧维度增加合计列
     */
    private Boolean leftDimensionSumed =false;
    /**
     * 维度合计标题名称,
     */
    private String LeftDimensionSumName;
    /**
     * 维度合计李单元格格式化配置
     */
    private ReportCellSetting leftDimensionSumSetting;
    /**
     * 是否根据上侧维度列增加合计值
     */
    private Boolean topDimensionSumed=false;
    /**
     * 是否进行按照上侧维度列进行小计
     */
    private Boolean subTopDimensionSumed=false;
    /**
     * 上侧维度列小计的位移数,1 则是按照第一列维度列的值进行小计,2则是第二列 以此类推....
     */
    private Integer subTopDimensionSumeShift=1;
    /**
     * 是否关联报表,
     */
    private Boolean bindReported=false;
    /**
     * 关联报表ID
     */
    private Long targetReportId;
    /**
     * 关联报表参数
     */
    private List<ColumnLinkReportParam> targetReportParams;
    /**
     * 排序,
     */
    private Integer orderIndex;

    public String getSqlColumnName() {
        return sqlColumnName;
    }

    public void setSqlColumnName(String sqlColumnName) {
        this.sqlColumnName = sqlColumnName;
    }

    public String getReportColumnName() {
        return reportColumnName;
    }
    public void setReportColumnName(String reportColumnName) {
        this.reportColumnName = reportColumnName;
    }

    public DbColumnTypeEnum getDbColumnType() {
        return dbColumnType;
    }

    public void setDbColumnType(DbColumnTypeEnum dbColumnType) {
        this.dbColumnType = dbColumnType;
    }

    public BIColumnTypeEnum getBiColumnType() {
        return biColumnType;
    }

    public void setBiColumnType(BIColumnTypeEnum biColumnType) {
        this.biColumnType = biColumnType;
    }

    public ColumnSortType getSortType() {
        return sortType;
    }

    public void setSortType(ColumnSortType sortType) {
        this.sortType = sortType;
    }

    public ReportCellSetting getSetting() {
        return setting;
    }

    public void setSetting(ReportCellSetting setting) {
        this.setting = setting;
    }

    public Boolean getLeftDimensionSumed() {
        return leftDimensionSumed;
    }

    public void setLeftDimensionSumed(Boolean leftDimensionSumed) {
        this.leftDimensionSumed = leftDimensionSumed;
    }

    public String getLeftDimensionSumName() {
        return LeftDimensionSumName;
    }

    public void setLeftDimensionSumName(String leftDimensionSumName) {
        this.LeftDimensionSumName = leftDimensionSumName;
    }

    public ReportCellSetting getLeftDimensionSumSetting() {
        return leftDimensionSumSetting;
    }

    public void setLeftDimensionSumSetting(ReportCellSetting leftDimensionSumSetting) {
        this.leftDimensionSumSetting = leftDimensionSumSetting;
    }

    public Boolean getTopDimensionSumed() {
        return topDimensionSumed;
    }

    public void setTopDimensionSumed(Boolean topDimensionSumed) {
        this.topDimensionSumed = topDimensionSumed;
    }

    public Boolean getSubTopDimensionSumed() {
        return subTopDimensionSumed;
    }

    public void setSubTopDimensionSumed(Boolean subTopDimensionSumed) {
        this.subTopDimensionSumed = subTopDimensionSumed;
    }

    public Integer getSubTopDimensionSumeShift() {
        return subTopDimensionSumeShift;
    }

    public void setSubTopDimensionSumeShift(Integer subTopDimensionSumeShift) {
        this.subTopDimensionSumeShift = subTopDimensionSumeShift;
    }

    public Boolean getBindReported() {
        return bindReported;
    }

    public void setBindReported(Boolean bindReported) {
        this.bindReported = bindReported;
    }

    public Long getTargetReportId() {
        return targetReportId;
    }

    public void setTargetReportId(Long targetReportId) {
        this.targetReportId = targetReportId;
    }

    public List<ColumnLinkReportParam> getTargetReportParams() {
        return targetReportParams;
    }

    public void setTargetReportParams(List<ColumnLinkReportParam> targetReportParams) {
        this.targetReportParams = targetReportParams;
    }

    public Integer getOrderIndex() {
        return orderIndex;
    }

    public void setOrderIndex(Integer orderIndex) {
        this.orderIndex = orderIndex;
    }
}
